from selenium.webdriver.common.by import By
from action.base_action import BaseAction
import allure


class MainPage(BaseAction):
    """
    首页
    """
    __search_ipt = (By.CSS_SELECTOR, '#kw')

    @allure.step('首页检索')
    def main_search(self, search_value: str):
        '''首页检索

        :param str search_value: 搜索关键字
        :return _type_: _description_
        '''
        self.logger.info(f"首页检索 {search_value}")
        self._wait_element(self.__search_ipt, 10)
